<?php

namespace app\common\validate\Project;

//引入底层的验证器类
use think\Validate;

/**
 * 服务订单验证器
 */
class Order extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'userid' => 'require', //必填
        'addrid' => 'require', //必填
        'projectid' => 'require', //必填
        'rate' => 'number',
        'status' => 'number|in:-1,0,1,2,3',  //给字段设置范围
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'userid.require'  => '用户信息未知',
        'addrid.require'  => '上门服务地址未知',
        'projectid.require'  => '上门服务项目未知',
        'rate.number'  => '评分必须是数字',
    ];
    
    /**
     * 验证场景
     */
    protected $scene = [
    ];
}
